When using multiple rules to prove an attribute, you must be extremely careful to ensure that you have closed the logic with your rules. If all of the rules proving your conclusion (goal) attribute do not provide full logical coverage, your rules will not cover every possible situation.
Imagine that you wanted to add the following rules to your model:
the passenger's favorite color = "blue" if
the passenger selected the blue seat
the passenger's favorite color = "orange" if
the passenger selected the orange seat
the passenger's favorite color = "purple" if
the passenger selected the purple seat
If there were a fourth seat color (eg "olive"), then the rules would not cope with that situation.
Instead of using multiple rules to prove the goal, you use rule tables to cover this situation. Rule tables provide an invisible layer of truth management by enforcing the effective creation of additional conditions and enforcing question order to avoid goal exhaustion when your rules are built.
The following diagram shows how this table must be structured:
conclusion | |
---|---|
value | condition |
value | condition |
value | otherwise |
The first row of the table defines which attribute will be used as the conclusion attribute for the rule.
The left hand column is used to specify values (includes mathematical expressions) which will set the value of the conclusion attribute if the condition in the right hand column of the same row is satisfied.
The final row provides an alternative conclusion, to which the conclusion will be set if none of the conditional rows are satisfied.
To add a rule table in Word:
otherwise |
the passenger's favorite color | |
---|---|
otherwise |
the passenger's favorite color | |
---|---|
"blue" | the passenger selected the blue seat |
"orange" | the passenger selected the orange seat |
"purple" | the passenger selected the purple seat |
otherwise |
the passenger's favorite color | |
---|---|
"blue" | the passenger selected the blue seat |
"orange" | the passenger selected the orange seat |
"purple" | the passenger selected the purple seat |
uncertain | otherwise |